package com.spring.i18n_demo;

import org.springframework.context.MessageSource;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Locale;

public class App {
	public static void main(String[] args) {
		MessageSource resources = new ClassPathXmlApplicationContext("spring.xml");
//		String message = resources.getMessage("argument.required",
//				new Object [] {"userDao"}, "Required", Locale.UK);
//		System.out.println(message);

		String message1 = resources.getMessage("argument.required",
				new Object [] {"userDao"}, "Required", Locale.SIMPLIFIED_CHINESE);
		System.out.println(message1);
	}
}
